#define _CRT_SECURE_NO_WARNINGS 1


#include <stdio.h>

char* im_strncpy(char* dest, const char* src, int num)
{
	char* c = dest;
	int n = 0;
	while (n<num && (*dest++ = *src++))
	{
		++n;
	}
	n += 1;
	while (n < num)
	{
		++n;
		*dest++ = 0;
	}
}


int main()
{
	char a[20];
	char b[] = "abc";
	im_strncpy(a, b, 10);
	return 0;
}